var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 粉丝明细表
var mod = {
    pcode: {
        name: '被关注用户code',
        type: 'string',
        length: 12
    },
    pisread:{
        name: '消息是否已读',
        type: 'number',
        default: 0    
    },
    fcode: {
        name: '粉丝用户code',
        type: 'string',
        length: 12
    },
    fisread:{
        name: '消息是否已读',
        type: 'number',
        default: 0    
    },
    state:{
        name: '关注状态,0:取消关注,1:关注',
        type: 'number',
        default: 0
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    }
};

module.exports = {
    init,
    format
};